#pragma once

namespace fly
{
	namespace jld
	{
		namespace jack
		{
			namespace dp
			{
				template<typename T>
				class singleton
				{
				private:
					static T t_;
					singleton(const singleton&);
					const singleton& operator =(const singleton&);
				protected:
					singleton(){}
					virtual ~singleton(){}
				public:
					static T& instance()
					{
						return t_;
					}

				};

				template<typename T>
				T singleton<T>::t_ = T();

			}

		}
	}
}